package com.wang.springcloud.item.order.controller;

import com.wang.springcloud.item.order.client.UserServiceClient;
import com.wang.springcloud.item.user.dto.UserDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @Autowired
    private UserServiceClient userServiceClient;
    @GetMapping("user-info")
    public UserDTO userInfo(Long id) {
        return userServiceClient.getUserById(id);
    }
}
